<?php
/**
 * View  LaFabbrica.org
 * 
 * @author     luigi.pastore (gigi@la-fabbrica.org)
 * @created    31-mag-2012
 * @package    LaFabbrica
 * @copyright  Copyright (c) 2011 Luigi Pastore
 */
?>
<script type="text/javascript">
    //<![CDATA[
     
    $(document).ready(function()
    {
	
    });

    //]]>
</script>
<div class="info">
    <h2>Gestisci Partner</h2>
    <div>Per inserire un nuovo post...</div>
    <div>I campi contrassegnati da <span class="req">*</span> sono obbligatori!</div>
</div>
    <form>
	<ul>
	    <li class="paging-context ">
		<table class="pgStyle1 circle2" cellspacing="0">
		    <tr>
			<td class="c completed">
			    <var>1</var>
			</td>
			<td class="t completed">
			    <b id="pagecircle1">Dettagli Partner</b>
			</td>
			<td class="c selected">
			    <var>4</var>
			</td>
			<td class="t selected">
			    <b id="pagecircle2">Fine!</b>
			</td>
		    </tr>
		</table>
	    </li>

	</ul>
    </form>
<div id="content">
    <div id="success">
	<ul>
	    <li id="successLi">
		<h3 id="successMsgLbl">Operazione Eseguita Correttamente!</h3>
	    </li>
	</ul>
    </div>    
    <div id="summary" class="contact">
	<div class="head contact">
	    <h2>Riepilogo Partner:</h2>
	</div>
	<div class="body">
	    <table cellspacing="0" class="table">
		<tbody>
		    <tr>
			<th>Nome:</th>
			<td>
			    <strong>
                            <?php echo $this->data['partner_name'] ?>
			    </strong>
			</td>
		    </tr>
    		    <tr>
    			<th>Email Principale:</th>
    			<td>
    			    <strong>
                            <?php echo $this->data['partner_email'] ?>
    			    </strong>
    			</td>
    		    </tr>
    		    <tr>
    			<th>Telefono Principale:</th>
    			<td>
    			    <strong>
                            <?php echo $this->data['partner_phone'] ?>    
    			    </strong>
    			</td>
    		    </tr>
		    <tr class="break">
			<td colspan="2">&nbsp;</td>
		    </tr>
		    <tr>
			<th>Indirizzo:</th>
			<td>
                        <?php 
                        $address = NULL;

                        if( $this->data['partner_street'] != '' )
                            $address .= $this->data['partner_street'] .', ';

                        if( $this->data['partner_street_number'] != '' )
                            $address .= 'N&deg; '. $this->data['partner_street_number'] .'<br />';

                        if( $this->data['partner_loc'] != '' )
                            $address .= 'Localit&aacute; '. $this->data['partner_loc'] .'';

                        if( $this->data['partner_cap'] != '' )
                            $address .= $this->data['partner_cap'];

                        if( $this->data['partner_city'] != '' )
                            $address .= ' <strong>'. strtoupper( $this->data['partner_city'] ) .'</strong> ';

                        if( $this->data['partner_province_id'] != '' )
                            $address .= '('. strtoupper( $this->province[$this->data['partner_province_id']]['province_short_name'] ) .')';

                        if( $address !== NULL )
                        {
                            echo $address;
                        }
                        ?>
                        </td>
		    </tr>
		    <tr>
			<th>Fax:</th>
			<td><?php echo $this->data['partner_fax'] ?></td>
		    </tr>
		    <tr>
			<th>Note:</th>
                        <td><?php echo html_entity_decode( $this->data['partner_notes'] ) ?></td>
		    </tr>
		</tbody>
	    </table>
	</div>
    </div>
    <br style="clear: both" />

    <form class="fab">
        <ul>
            <li class="section">
                <h3>Cosa vuoi fare ora?</h3>
            </li>
            <li class="addnew center">
                <a id="" class="button" href="/admin/partners/vedi/id/<?php echo $this->data['partner_id'] ?>">
                    <img src="/images/admin/16x16/view.png" />Vedi Partner
                </a>
                <a id="" class="button" href="/admin/partners/info/id/<?php echo $this->data['partner_id'] ?>">
                    <img src="/images/admin/16x16/edit.png" />Modifica Partner
                </a>
                <a id="" class="button" href="/admin/partners/associacontatti/id/<?php echo $this->data['partner_id'] ?>">
                    <img src="/images/admin/16x16/link.png" />Associa Contatti a questo Partner
                </a>
                <a id="new" class="button" href="/admin/partners/info">
                    <img src="/images/admin/16x16/add-new.png" />Aggiungi Nuovo Partner
                </a>
                <a id="" class="button" href="/admin/partners">
                    <img src="/images/admin/partner-icon.png" />Vai a Elenco Partner
                </a>
            </li>
        </ul>
    </form>
    <br class="clear"/>
</div>